﻿<!--#include file = "base.asp"-->
<!--#include file = "function.asp"-->
<link href="skin/default/main.css" rel="stylesheet" type="text/css" />
<link href="skin/default/body.css" rel="stylesheet" type="text/css" />
<link href="skin/default/login.css" rel="stylesheet" type="text/css" />
<script language="javascript">
window.document.title="管理员登录";
</script>
<%
dim location
location=request.QueryString("from")
%>
<div>
<!--<div class="title_cont">
<div class="title_pos">管理员登录</div></div>-->
<script language="javascript">
function CheckData()//表单数据检查函数
{
	var errMsg = "";

	//用户名、密码、验证都不能为空
	if(document.form1.username.value == "")
		errMsg = "请输入用户名"
	else if(document.form1.passwd.value == "")
		errMsg = "请输入密码"
	else if(document.form1.SafeCode.value == "")
		errMsg = "请输入验证码"
		
	if(errMsg == "")
		return true;
	else
	{
		window.alert(errMsg);//提示错误信息
		return false;
	}
}
function SubmitForm()
{
	//在提交表单时检验数据有效性
	if(CheckData()){	
		document.form1.submit();
		//window.close();
	}
}
</script>
<div id="login_cont">
<form action="users/checklogin.asp?from=login.asp" method="post" id="form1" name="form1" target="_parent">
<div id="login_table">
<table align="center">
<tr>
<td align="left">用户名</td>
<td align="left"><input id="username" name="username" type="text" size="18" maxlength="16" /></td>
<td><input name="location" type="hidden" value="<%=location%>" /></td>
</tr>
<tr>
<td align="left">密&nbsp;&nbsp;码</td>
<td align="left"><input id="passwd" name="passwd" type="password" size="19" maxlength="16" /></td>
<td>&nbsp;</td>
</tr>
<tr>
<td align="left">验证码</td>
<td align="left"><input id="SafeCode" name="SafeCode" type="text" size="18" maxlength="16" /></td>
<td>
<% 
	'获得验证码图片
	call GetSafeCode()
%></td>
</tr>
<tr>
<td colspan="3">&nbsp;</td>
</tr>
<tr>
      <td colspan="3"><table width="100%"  border="0">
        <tr>
          <td width="12%">&nbsp;</td>
          <td width="36%" align="center"><input name="btnSub" type="button" width="99" height="23" border="0" value="提交" onClick="SubmitForm()"></td>
          <td width="27%" align="center"><input name="btnReset" type="reset" width="99" height="23" border="0" value="重置"></td>
          <td width="25%">&nbsp;</td>
        </tr>		
        <!--<tr>
          <td>&nbsp;</td>
          <td colspan="3" align="center"><br /><a href="register.asp">加入会员</a></td>
        </tr>-->		
		<tr>
          <td colspan="4" align="center" style="color:#FF0000"><br />注册功能已关闭，请联系管理员！</td>
        </tr>
      </table></td>
    </tr>
</table>
</div>
</form>
</div>
</div>